package book;

public class Book {
    private String name;
    private String auth;
    private int price;
    private String type;
    private boolean isborrowed;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuth() {
        return auth;
    }

    public void setAuth(String auth) {
        this.auth = auth;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean GetIsborrowed() {
        return isborrowed;
    }

    public void setIsborrowed(boolean isborrowed) {
        this.isborrowed = isborrowed;
    }

    public Book(String name, String auth, int price, String type) {
        this.name = name;
        this.auth = auth;
        this.price = price;
        this.type = type;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", auth='" + auth + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ( (isborrowed == true) ? " 已借出" : " 未借出") +
                '}';
    }
}
